let user = {
	state: {
		token: uni.getStorageSync('token') || '',
		userInfo: uni.getStorageSync('userInfo') || {},
	},
	mutations: {
		SET_TOKEN: (state, token) => {
      uni.setStorageSync('token', token)
		  state.token = token
		},
		SET_USER_INFO: (state, data) =>{
			uni.setStorageSync('userInfo', data)
			state.userInfo = {...data}
		},
		CLEAR_INFO: (state, data) => {
			uni.clearStorageSync()
		},
	},
}
export default user